package shmged.com.shlcm.utils;

import wt.type.TypeDefinitionReference;
import wt.type.TypedUtility;
import wt.util.WTException;

public enum CmShmgedType {
	ProjectInfoEntry("wt.doc.WTDocument|ProjectInfoEntry"),
	NewsEntry("wt.doc.WTDocument|NewsEntry"),
	ProjectScheduleEntry("wt.doc.WTDocument|ProjectScheduleEntry"),
	UserInfoEntry("wt.doc.WTDocument|UserInfoEntry");
	
	private String key;
	private TypeDefinitionReference tdr;
	
	
	private CmShmgedType(String key){
		this.key = key;
		String typeId = null;
		try {
			typeId = CmWTUtil.qualifyTypeId(key);
		} catch (WTException e) {
			e.printStackTrace(); 
		}
        TypeDefinitionReference tdr = TypedUtility.getTypeDefinitionReference(typeId);
        this.tdr = tdr;
	}
	
	@Override
	public String toString() {
		return key;
	}

	public String getKey() {
		return key;
	}

	public TypeDefinitionReference getTdr() {
		return tdr;
	}
	
	
	

}
